package erfgame.core;

import java.util.Random;

public class GausienSequence implements Sequence<Double> {
	
	private Random random;
	
	public GausienSequence( Random random ) {
		this.random = random;
	}

	public Double next() {
		double g = this.random.nextGaussian();
		// want it to be between 0 and 1 (which isn't particularly possible)
		return Math.max(0, Math.min(1, (g+1)/2));
	}
	
}
